package com.hyopt.common.push;

import com.alibaba.fastjson.JSONObject;
import com.hyopt.common.push.Notification.UmAndriodNotification;
import com.hyopt.common.push.Notification.UmIOSNotification;
import com.hyopt.common.push.config.UmConfig;
import com.hyopt.common.push.util.UmPushUtil;

public class Demo{

	public static void main(String[] args) throws Exception{


		UmAndriodNotification andUm=(UmAndriodNotification) UmPushUtil.getUotificationBySys(UmConfig.Sys.Android.name(),UmConfig.CasetType.broadcast.name());
		andUm.setDisplayType(UmConfig.DisplayType.message.name());
		andUm.setCustomField("防区点位变更!");
		UmIOSNotification iosUm=(UmIOSNotification) UmPushUtil.getUotificationBySys(UmConfig.Sys.IOS.name(),UmConfig.CasetType.broadcast.name());
		iosUm.setTitle("防区点位变更");
		if(andUm!=null){
			UmPushUtil.sendUmRequest(andUm);
		}
		if(iosUm!=null){
			UmPushUtil.sendUmRequest(iosUm);
		}

	}
}
